/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

/**
 *
 * @author hungpm_b01223
 */
public class forgotPassDao {
    ConnectDB myConn=new ConnectDB();
    Connection conn;
    public String findPass(String email){
        String pass=null;
        try {
            conn=myConn.getConnect();
            String qr="select pass from userName where email='"+email+"'";
            Statement sta=conn.createStatement();
            ResultSet rs=sta.executeQuery(qr);
            while(rs.next()){
                pass=rs.getString(1);
            }
        } catch (Exception e) {
        }
        return  pass;
    }
}
